import request from '../../utils/request';
// 左边菜单列表
export function menuList (params){
    return request({
        url:"/sys/menu/getMenuTree.do",
        method: 'post',
        params: params,
        headContype:true
    });
};
// 获取菜单管理列表
export function getMenuList (params){
    return request({
        url:'/sys/menu/getAllMenuTree.do',
        method: 'post',
        params: params,
        headContype:true
    });
};
// 新增菜单
export function addMenu (params){
    return request({
        url:'/sys/menu/add.do',
        method: 'post',
        data: params,
        headContype:true
    });
};
// 删除菜单
export function delMenu (params){
    return request({
        url:'/sys/menu/delete.do',
        method: 'DELETE',
        params: params
    });
};
// 查看菜单编辑详情
export function lookMenuDetail (params){
    return request({
        url:'/sys/menu/getMenu.do',
        method: 'get',
        params: params
    });
};
// 编辑菜单
export function editMenu (params){
    return request({
        url:'/sys/menu/edit.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

// 获取帐号列表数据
export function getAccountList (params){
    return request({
    url:'/sys/user/findUserListByPage.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

// 获取管理员账号列表
export function getAdminAccountList (params){
    return request({
    url:'/sys/user/findUserListByMerchant.do',
        method: 'post',
        data: params,
        headContype:true
    });
};


//管理员添加 账号信息
export function adminAddAccount (params){
    return request({
        url:'/sys/user/add.do',
        method: 'post',
        data: params,
        headContype:true
    });
};


// 查看菜单编辑详情
export function lookAccountDetail (params){
    return request({
        url:'/sys/user/getUser.do',
        method: 'get',
        params: params
    });
};

// 单个删除帐号列表
export function siginDelAcount (params){
    return request({
        url:'/sys/user/delete.do',
        method: 'DELETE',
        params: params
    });
};


//编辑账号信息
export function editAccount (params){
    return request({
        url:'/sys/user/edit.do',
        method: 'post',
        data: params,
        headContype:true
    });
};
